<div class="media form-group col-md-12 mb-0 js-jcrop-interface {$form[type].extra_class|default=''}" id="form_group_{$form[type].name}">
  <div class="lyear-uploads-pic update-avatar mr-3"><img src="{$form[type]['value']|get_thumb}" width="68" height="68" class="img-avatar" /></div>
  <div class="media-body">
    <button class="btn btn-primary js-jcrop-upload-btn" type="button">{$form[type].title}</button>
    <input type="hidden" class="js-jcrop-cut-info" value="">
    <input type="file" class="d-none js-jcrop-file" accept="image/jpg,image/jpeg,image/bmp,image/png,image/gif" value="">
    <input type="hidden" class="js-jcrop-input" id="{$form[type].name}" name="{$form[type].name}" value="{$form[type].value|default=''}">
    {notempty name="form[type].remark"}
    <p class="mt-1 mb-0">{$form[type].remark|raw|clear_js}</p>
    {/notempty}
  </div>

  <!-- Pop In Modal -->
  <div class="modal modal-lyear fade" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog modal-lg">
      <div class="modal-content">
        <div class="modal-header">
          <h6 class="modal-title">图片裁剪</h6>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="row">
            <div class="jcrop-img col-lg-9 m-b-15">
              <img src="{$form[type].value|get_file_path}" data-id="{$form[type].value|default=''}" data-options='{$form[type].options|default=""}' class="js-jcrop" style="display: none;" alt="">
            </div>
            <div class="col-lg-3">
              <div class="jcrop-preview-parent" {$form[type]['value'] ?: "style='display:none'"}>
                <img src="{$form[type].value|get_file_path}" class="jcrop-preview" />
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <span class="float-left">在图片上拖动鼠标，选择裁剪选区，然后点击“<strong>立即裁剪</strong>”按钮</span>
          <button class="btn btn-sm btn-default" type="button" data-dismiss="modal">关闭</button>
          <button class="btn btn-sm btn-primary js-jcrop-cut-btn" type="button"><i class="mdi mdi-content-cut"></i> 立即裁剪</button>
        </div>
      </div>
    </div>
  </div>
  <!-- END Pop In Modal -->
</div>
{assign name="useMagnificPopup" value="1" /}
{assign name="useJcrop" value="1" /}